#include<iostream>
using namespace std;
bool sushu(int x){
    for(int i=2;i<x;i++){
        if(x%i==0) return false;
    }
    return true;
}
int main(){
    int n,m,num=0,sum,t=4;
    cin>>n;
    while(n<=0||n>=50)
    {cout<<"请重新输入武力值";
    cin>>n;}
    while(t--){
    cin>>m;
    while(m<=0||m>=50)
    {cout<<"请重新输入武力值";
    cin>>m;}
    sum=(n-m)*(n-m)+(n-m)+41;
    if(sushu(sum)) num++;
    }
    if(num==4)cout<<"WIN"<<endl;
    else cout<<num<<endl;
}